tool
extends Spatial

var m: Array = []

func _ready():
	for i in range(8):
		m.push_back(get_node("m" + str(i)))

func setup(aabb: AABB):
	var v: PoolVector3Array = PoolVector3Array([aabb.position, aabb.end])

	for i in range(8):
		m[i].transform.origin = Vector3(v[i & 1].x, \
			v[(i >> 1) & 1].y, v[(i >> 2) & 1].z)
